%Creates one big cluster

d = 6; %dimension
C = create_cluster(zeros(1,d)', 10*ones(1,d)', d*15);

clusters_num = 3;

%K-means
for k=2:clusters_num
    class = kmeans(C', k);
    figure;
    [sil, h] = silhouette(C', class);
    t = sprintf('K-Means results. K=%d', k);
    title(t);
end

%Hierarchical NN
for k=2:clusters_num
    figure;
    Y = pdist(C','euclid'); 
    Z = linkage(Y,'single'); 
    T = cluster(Z, 'maxclust', k);
    dendrogram(Z);
    t = sprintf('Hierarchical NN. K=%d', k);
    title(t);
end

%Hierarchical FN
for k=2:clusters_num
    Y = pdist(C','euclid'); 
    Z = linkage(Y,'complete'); 
    T = cluster(Z, 'maxclust', k);
    figure;
    dendrogram(Z);
    t = sprintf('Hierarchical FN. K=%d', k);
    title(t);
end

%Conclusion: not very interesting